import React, {
    Component,
    PropTypes
} from 'react';
import {
    createStore
} from 'redux';
import ReactDOM, {
    render
} from 'react-dom';
import {
    Provider
} from 'react-redux';
import route from './Route';
import store from './Redux/store';

//引用样式
import './scss/common/reset.scss'
import './scss/common/media.scss'
import './scss/common/public.scss'

//Plugins
import './Plugins/layer-v3.1.1/layer/layer.js'
import './Plugins/layer-v3.1.1/layer/theme/default/layer.css'

import './Plugins/font/iconfont.css'
// 引入vconsole调试
// import './js/vconsole.js'


// 监听state变化
// store.subscribe(() => {
//     console.log(store.getState())//获取state
// });

// 模拟触发state
// store.dispatch({
//   type: 'increase'
// });

render(
    <Provider store={store}>
        {route}
    </Provider>,
    document.getElementById('main')
);
